package com.day0310;

//含有抽象方法的类一定是抽象类
//抽象类不一定有抽象方法

public abstract class Lock {
    public abstract void open();
    public void close(){

    }
}

class FingerLock extends Lock{
    @Override
    public void close() {

    }

    @Override
    public void open() {
        System.out.println("指纹的open方法");

    }

}

class FaceLock extends Lock{
    @Override
    public void close() {

    }

    @Override
    public void open() {

        System.out.println("面部锁的open方法");
    }

}
class TestLock{
    public static void main(String[] args) {
        //Lock lock= new Lock();
        FingerLock fingerlock = new FingerLock();
        fingerlock.open();
        FaceLock fl = new FaceLock();
        fl.open();
    }

}
